import GongNeng from "./img/rightGongNeng.png"
import ShouCe from "./img/rightShouCe.png"
import KouJing from "./img/rightkouJIng.png"
import React,{ useState ,memo} from "react";
import styles from "./index.less";
import { Tooltip } from "antd";
const RightToolUtils= () => {
  const [show, setShow] = useState(false);
  const [open, setOpen] = useState(true);
  const closeModal = ()=>{
    setShow(true);
    setOpen(false);
  }
  const openModal = ()=>{
    setShow(false);
    setOpen(true);
  }
  const jumpNewUrl = (url) =>{
     window.open(url);
  }
  return <div className={styles.content}>
    {show&&<img onClick={openModal}  className={styles.gongNeng} src={GongNeng} alt=""/>}
    {open && <div className={styles.list}>
      <Tooltip placement="leftTop" title={"口径说明"}>
          <img onClick={()=>jumpNewUrl("https://docs.qq.com/doc/DS2JZZmtSd3FYd2FI")} className={styles.img1} src={KouJing} alt=""/>
        </Tooltip>
        <Tooltip placement="leftTop" title={"使用手册"}>
          <img onClick={()=>jumpNewUrl("https://docs.qq.com/doc/DTEVIdkl6U2RidXZP?nlc=1")} className={styles.img2} src={ShouCe} alt=""/>
        </Tooltip>
        <div onClick={closeModal} className={styles.sub}>-</div>
      </div>
    }
  </div>
}

export default memo(RightToolUtils);
